package com.csx.governance.sample.gw;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient;
import org.springframework.cloud.client.loadbalancer.LoadBalancerInterceptor;
import org.springframework.cloud.loadbalancer.core.ServiceInstanceListSupplier;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @author cuisongxu
 * @date 2023/4/3 9:56
 */
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
public class GwSampleApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(GwSampleApplication.class, args);
        LoadBalancerInterceptor loadBalancerInterceptor = applicationContext.getBean(LoadBalancerInterceptor.class);
        ServiceInstanceListSupplier serviceInstanceListSupplier = applicationContext.getBean(ServiceInstanceListSupplier.class);
        System.out.println(loadBalancerInterceptor);

    }
}
